//
//  KLAutoTrackerManager.h
//  RKLFoundationFrame
//
//  Created by RKL on 2018/2/11.
//  Copyright © 2018年 AppFrameWorkDemo. All rights reserved.
//

#import <Foundation/Foundation.h>

static NSString * KLAutoTrackerEventIDKey = @"KL_TRACKER_EVENTID_KEY";
static NSString * KLAutoTrackerInfoKey = @"KL_TRACKER_INFO_KEY";
static NSString * KLFileNameKey = @"Tracker.txt";

typedef void(^KLAutoTrackerManagerBlock)(NSDictionary * trackerDictionary);


/**
 管理类
 */
@interface KLAutoTrackerManager : NSObject


/**
 是否开启调试模式
 */
@property (nonatomic, assign) BOOL isDebug;

/**
 配置数据
 */
@property (nonatomic, strong) NSArray * configArray;

@property (nonatomic, copy) KLAutoTrackerManagerBlock successBlock;
@property (nonatomic, copy) KLAutoTrackerManagerBlock debugBlock;

+ (KLAutoTrackerManager *)sharedInstance;

/**
 开始打点
 
 @param successBlock 成功回调
 @param debugBlock 调试模式回调
 */
- (void)startWithCompletionBlockWithSuccess:(KLAutoTrackerManagerBlock)successBlock
                                      debug:(KLAutoTrackerManagerBlock)debugBlock;


/**
 清空文件内容
 */
- (void)clearFileContent;


/**
 将字典写入文件中
 
 @param fileContentDic NSDictionary
 */
- (void)saveToFileWithFileContent:(NSDictionary *)fileContentDic;


@end
